home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / comm / cnet / cnet_wof.lha / wof.lha / support.lha / Maint < prev    next >
Text File  |  1997-04-17  |  14KB  |  189 lines

  1. /**************************************************************************\
  2.      $VER: Wheel of Fortune MAINTENANCE, v6.51 (17-Apr-97) by Dotoran!
  3. \**************************************************************************/
  4. options results;signal on SYNTAX;signal on ERROR;signal on IOERR
  5. a=sourceline(2);parse var a . ", "ver" ("vdate")" .
  6. tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;mg=maygetchar
  7. parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
  8.  
  9. call GETCONFIG;changewhere "WOF Maintenance"
  10.  
  11. MAINT:;tr 'f1n1Cc9ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»'
  12.   tr 'Cc9ºcc>X<>X<cfr1 The Wheel of Fortune Maintenance Menu r0cc>X<>X<c9º';tr 'Cc9ºCº'
  13.   tr 'Cc9ºCcf[caCcf]caonfigure cbWheel of FortuneCc9º';tr 'Cc9ºCº'
  14.   tr 'Cc9ºCcf[ceWcf]ceeed the cbWOF cePlayers FileCc9º';tr 'Cc9ºCº'
  15.   tr 'Cc9ºCcf[caRcf]caeset the cbWheel of FortuneCc9º';tr 'Cc9ºCº';if reg=1 then do
  16.   tr 'Cc9ºCcf[ce1cf] ceRegistered cbWOF ceGame EditorCc9º'
  17.   tr 'Cc9ºCcf[ca2cf] caRegistered cbWOF caReg Graphic Editor   c9º'
  18.   tr 'Cc9ºCcf[ce3cf] ceRegistered cbWOF cePuzzle EditorCc9º'
  19.   tr 'Cc9ºCcf[ca4cf] caRegistered cbWOF caColor EditorCc9º'
  20.   tr 'Cc9ºCcf[ce5cf] ceRegistered cbWOF ceHistory EditorCc9º';tr 'Cc9ºCº';end;if reg=0 then do
  21.   tr 'Cc9ºCcf[ceVcf]ceiew Registered Screen ShotsCc9º';tr 'Cc9ºCº';end
  22.   tr 'Cc9ºCcf[cdQcf]cduit this Maintenance MenuCc9º'
  23.   tr 'Cc9ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼn1'
  24.   se 'CcbMaintc9: cf>>>--caCcf,ceWcf,caRcf,cdQcf--> ';gc;a=index('CWRVQ12345',result)
  25.   if a=5 | a=0 | (reg=0 & a>5) | (reg=1 & a=4) then do;tr 'cdQuit';exit;end
  26.   if a=1 then do;tr "caConfigure#0"dfile"Config}";changewhere "WOF Maintenance";signal MAINT;end
  27.   if a=2 then do;tr 'ceWeedf1';signal WEEDPLAYERS;end;if a=3 then do;tr 'caResetn1';signal RESET;end
  28.   if a=4 & reg=0 then do;tr "ceView Screens#0"dfile"Incentive/SysOpReg}";changewhere "WOF Maintenance";signal MAINT;end
  29.   if a=6 & reg=1 then do;tr "ceGameEditor#0"rfile"GameEditor}";changewhere "WOF Maintenance";signal MAINT;end
  30.   if a=7 & reg=1 then do;tr "caRegGraphicEditor#0"rfile"RegGraphicEditor}";changewhere "WOF Maintenance";signal MAINT;end
  31.   if a=8 & reg=1 then do;tr "cePuzzleEditor#0"rfile"PuzzleEditor}";changewhere "WOF Maintenance";signal MAINT;end
  32.   if a=9 & reg=1 then do;tr "caColorEditor#0"rfile"ColorEditor}";changewhere "WOF Maintenance";signal MAINT;end
  33.   if a=10& reg=1 then do;tr "caHistoryEditor#0"rfile"HistoryEditor}";changewhere "WOF Maintenance";signal MAINT;end
  34.  
  35. WEEDPLAYERS:;tr 'cc>X<>X<cfr1 Weed Wheel of Fortune Players File r0cc>X<>X<n1'
  36.   tr 'c6Choose from these possible c9weed c6parameters:n1'
  37.   tr '>4ca1cb> caAll players who have NEVER WON a game.'
  38.   tr '>4ce2cb> ceAll players who have won a TOTAL of $0 bucks.'
  39.   tr '>4ca3cb> caAll players who were INACTIVE for the PAST 10 GAMES.'
  40.   tr '>4ce4cb> ceNEVER WON a game AND a total of $0 bucks.'
  41.   tr '>4ca5cb> caNEVER WON a game AND were INACTIVE in PAST 10 GAMES.'
  42.   tr '>4ce6cb> ceWON a total of $0 bucks AND were INACTIVE in PAST 10 GAMES.'
  43.   tr '>4ca7cb> caNEVER WON a game OR money, AND were INACTIVE in PAST 10 GAMES.n1'
  44.   se 'c9Weed c6users using cfwhich c6parameters? c7[c9Abortc7]c6: ca';gc;p=index('1234567',result)
  45.   if p=0 then do;tr 'c9Abort';signal MAINT;end;else tr p'n1'
  46.   call open(f1,tfile"GameData","r");puz=readln(f1);call close(f1)
  47.   call open(f1,tfile"Players","r");do i=1 until eof(f1);p.i=readln(f1)
  48.   end i;tot=i-1;call close(f1);d=0;call open(f1,tfile"Players","w")
  49.   do i=1 to tot;a='';parse var p.i h"|"tw"|"tm"|"cp"|"j
  50.     if p=1 & tw>0 then a=p.i;if p=2 & tm>0 then a=p.i
  51.     if p=3 & cp>puz-10 then a=p.i;if p=4 & tw>0 & tm>0 then a=p.i
  52.     if p=5 & tw>0 & cp>puz-10 then a=p.i;if p=6 & tm>0 & cp>puz-10 then a=p.i
  53.     if p=7 & tw>0 & tm>0 & cp>puz-10 then a=p.i;if a~='' then call writeln(f1,a)
  54.     else do;co="a";if d//2=0 then co="e";tr "c9Deletedc6: c"co||h;d=d+1;end
  55.   end i;call close(f1);if d=0 then tr 'cbr1 NO PLAYERS DELETED r0n1'
  56.   else tr "n1caTotal c6ofc9: cd"d" cePlayers c9Deletedc6!n1"
  57.   tr 'c7Press cdAny c7Keyc6...g1'
  58.  signal MAINT
  59.  
  60. RESET:;se 'Cc6Do a c7[caCc7]caompletec6, or c7[cbPc7]cbartial c6Reset? c7[c9Abortc7]c6: '
  61.   gc;a=index('CP',result);if a=0 then do;tr 'c9Abort';signal MAINT;end
  62.   if a=1 then do;tr 'caCompletef1'
  63.     tr 'cc>X<>X<cfr1 Complete Wheel of Fortune Reset r0cc>X<>X<n1'
  64.     tr 'c6The following cbfiles c6will be c9deletedc6:n1'
  65.     tr 'CcaGameData c7>>--> caInfo on Current Game being Played.'
  66.     tr 'CceLastPlayer cf>>--> ceInfo on the Last Player of Game.'
  67.     tr 'CcaLastReset c7>>--> caDate/Handle of Last Game Reset.'
  68.     tr 'CcePlayers cf>>--> ceData file on ALL WOF Players.'
  69.     tr 'CcaWinner c7>>--> caInfo on Winner of the LAST Game.'
  70.     tr 'CceWinners cf>>--> ceInfo on the LAST 20 Winners.'
  71.     tr 'CcaBWinner c7>>--> caInfo on Winner of LAST BONUS Game.'
  72.     tr 'CceBWinners cf>>--> ceInfo on LAST 20 BONUS Winners.'
  73.     tr 'CcaLog.NEW.#? c7>>--> caEvents that occurred during THIS Game.'
  74.     tr 'CceLog.OLD.#? cf>>--> ceEvents that occurred during LAST Game.'
  75.     tr 'CcaStats c7>>--> caInfo on the HIGH SCORES obtained.'
  76.     tr 'CceMillionaires cf>>--> ceInfo on Regular Millionaires.'
  77.     tr 'CcaBMillionaires c7>>--> caInfo on Bonus Round Millionaires.'
  78.     tr 'CceBankers cf>>--> ceInfo on Best WOF Players.n1'
  79.     se 'c6Are you cbSURE c6you want to do this? c7[caNoc7]c6: ca'
  80.     gc;a=result;if a~='Y' then do;tr 'No.';signal MAINT;end
  81.     tr 'Yes!n2cbResetting caCOMPLETE c6Game...n1'
  82.     se 'c9Deleting cb"caGameDatacb"c6.......file...'
  83.       if exists(tfile"GameData") then address command "delete "tfile"GameData";tr 'cdDonec6.'
  84.     se 'c9Deleting cb"caPlayerscb"c6........file...'
  85.       if exists(tfile"Players") then address command "delete "tfile"Players";tr 'cdDonec6.'
  86.     se 'c9Deleting cb"caLastPlayercb"c6.....file...'
  87.       if exists(tfile"LastPlayer") then address command "delete "tfile"LastPlayer";tr 'cdDonec6.'
  88.     se 'c9Deleting cb"caLastResetcb"c6......file...'
  89.       if exists(tfile"LastReset") then address command "delete "tfile"LastReset";tr 'cdDonec6.'
  90.     se 'c9Deleting cb"caWinnercb"c6.........file...'
  91.       if exists(tfile"Winner") then address command "delete "tfile"Winner";tr 'cdDonec6.'
  92.     se 'c9Deleting cb"caWinnerscb"c6........file...'
  93.       if exists(tfile"Winners") then address command "delete "tfile"Winners";tr 'cdDonec6.'
  94.     se 'c9Deleting cb"caBWinnercb"c6........file...'
  95.       if exists(tfile"BWinner") then address command "delete "tfile"Bwinner";tr 'cdDonec6.'
  96.     se 'c9Deleting cb"caBWinnerscb"c6.......file...'
  97.       if exists(tfile"BWinners") then address command "delete "tfile"BWinners";tr 'cdDonec6.'
  98.     se 'c9Deleting cb"caLog.NEW.ASCcb"c6....file...'
  99.       if exists(tfile"Log.NEW.ASC") then address command "delete "tfile"Log.NEW.ASC";tr 'cdDonec6.'
  100.     se 'c9Deleting cb"caLog.NEW.ANScb"c6....file...'
  101.       if exists(tfile"Log.NEW.ANS") then address command "delete "tfile"Log.NEW.ANS";tr 'cdDonec6.'
  102.     se 'c9Deleting cb"caLog.NEW.IBMcb"c6....file...'
  103.       if exists(tfile"Log.NEW.IBM") then address command "delete "tfile"Log.NEW.IBM";tr 'cdDonec6.'
  104.     se 'c9Deleting cb"caLog.OLD.ASCcb"c6....file...'
  105.       if exists(tfile"Log.OLD.ASC") then address command "delete "tfile"Log.OLD.ASC";tr 'cdDonec6.'
  106.     se 'c9Deleting cb"caLog.OLD.ANScb"c6....file...'
  107.       if exists(tfile"Log.OLD.ANS") then address command "delete "tfile"Log.OLD.ANS";tr 'cdDonec6.'
  108.     se 'c9Deleting cb"caLog.OLD.IBMcb"c6....file...'
  109.       if exists(tfile"Log.OLD.IBM") then address command "delete "tfile"Log.OLD.IBM";tr 'cdDonec6.'
  110.     se 'c9Deleting cb"caStatscb"c6..........file...'
  111.       if exists(tfile"Stats") then address command "delete "tfile"Stats";tr 'cdDonec6.'
  112.     se 'c9Deleting cb"caMillionairescb"c6...file...'
  113.       if exists(tfile"Millionaires") then address command "delete "tfile"Millionaires";tr 'cdDonec6.'
  114.     se 'c9Deleting cb"caBMillionairescb"c6..file...'
  115.       if exists(tfile"BMillionaires") then address command "delete "tfile"BMillionaires";tr 'cdDonec6.'
  116.     se 'c9Deleting cb"caBankerscb"c6........file...'
  117.       if exists(tfile"Bankers") then address command "delete "tfile"Bankers";tr 'cdDonec6.n1'
  118.     tr "cbWheel of Fortunec6, cf"ver" c6has been caCOMPLETELY cbResetc6!n1"
  119.     se 'Simply enter one of the ceGame Modules c6to cfSTART c6a c9NEW c6Game!'
  120.   exit;end
  121.   if a=2 then do;tr 'cbPartialf1'
  122.     tr 'cc>X<>X<cfr1 Partial Wheel of Fortune Reset r0cc>X<>X<n1'
  123.     se 'c9Delete cb"caGameDatacb"c6.......file? c7[ceNoc7]c6: ce';gc;a=result
  124.     if a='Y' then do;se 'Yes!';if exists(tfile"GameData") then address command "delete "tfile"GameData"
  125.       tr ' cdDonec6.';end;else tr 'No.'
  126.     se 'c9Delete cb"caPlayerscb"c6........file? c7[ceNoc7]c6: ce';gc;a=result
  127.     if a='Y' then do;se 'Yes!';if exists(tfile"Players") then address command "delete "tfile"Players"
  128.       tr ' cdDonec6.';end;else tr 'No.'
  129.     se 'c9Delete cb"caLastPlayercb"c6.....file? c7[ceNoc7]c6: ce';gc;a=result
  130.     if a='Y' then do;se 'Yes!';if exists(tfile"LastPlayer") then address command "delete "tfile"LastPlayer"
  131.       tr ' cdDonec6.';end;else tr 'No.'
  132.     se 'c9Delete cb"caLastResetcb"c6......file? c7[ceNoc7]c6: ce';gc;a=result
  133.     if a='Y' then do;se 'Yes!';if exists(tfile"LastReset") then address command "delete "tfile"LastReset"
  134.       tr ' cdDonec6.';end;else tr 'No.'
  135.     se 'c9Delete cb"caWinnercb"c6.........file? c7[ceNoc7]c6: ce';gc;a=result
  136.     if a='Y' then do;se 'Yes!';if exists(tfile"Winner") then address command "delete "tfile"Winner"
  137.       tr ' cdDonec6.';end;else tr 'No.'
  138.     se 'c9Delete cb"caWinnerscb"c6........file? c7[ceNoc7]c6: ce';gc;a=result
  139.     if a='Y' then do;se 'Yes!';if exists(tfile"Winners") then address command "delete "tfile"Winners"
  140.       tr ' cdDonec6.';end;else tr 'No.'
  141.     se 'c9Delete cb"caBWinnercb"c6........file? c7[ceNoc7]c6: ce';gc;a=result
  142.     if a='Y' then do;se 'Yes!';if exists(tfile"BWinner") then address command "delete "tfile"BWinner"
  143.       tr ' cdDonec6.';end;else tr 'No.'
  144.     se 'c9Delete cb"caBWinnerscb"c6.......file? c7[ceNoc7]c6: ce';gc;a=result
  145.     if a='Y' then do;se 'Yes!';if exists(tfile"BWinners") then address command "delete "tfile"BWinners"
  146.       tr ' cdDonec6.';end;else tr 'No.'
  147.     se 'c9Delete cb"caLog.NEW.#?cb"c6....files? c7[ceNoc7]c6: ce';gc;a=result
  148.     if a='Y' then do;se 'Yes!'
  149.       if exists(tfile"Log.NEW.ASC") then address command "delete "tfile"Log.NEW.ASC"
  150.       if exists(tfile"Log.NEW.ANS") then address command "delete "tfile"Log.NEW.ANS"
  151.       if exists(tfile"Log.NEW.IBM") then address command "delete "tfile"Log.NEW.IBM"
  152.       tr ' cdDonec6.';end;else tr 'No.'
  153.     se 'c9Delete cb"caLog.OLD.#?cb"c6....files? c7[ceNoc7]c6: ce';gc;a=result
  154.     if a='Y' then do;se 'Yes!'
  155.       if exists(tfile"Log.OLD.ASC") then address command "delete "tfile"Log.OLD.ASC"
  156.       if exists(tfile"Log.OLD.ANS") then address command "delete "tfile"Log.OLD.ANS"
  157.       if exists(tfile"Log.OLD.IBM") then address command "delete "tfile"Log.OLD.IBM"
  158.       tr ' cdDonec6.';end;else tr 'No.'
  159.     se 'c9Delete cb"caStatscb"c6..........file? c7[ceNoc7]c6: ce';gc;a=result
  160.     if a='Y' then do;se 'Yes!';if exists(tfile"Stats") then address command "delete "tfile"Stats"
  161.       tr ' cdDonec6.';end;else tr 'No.'
  162.     se 'c9Delete cb"caMillionairescb"c6...file? c7[ceNoc7]c6: ce';gc;a=result
  163.     if a='Y' then do;se 'Yes!';if exists(tfile"Millionaires") then address command "delete "tfile"Millionaires"
  164.       tr ' cdDonec6.';end;else tr 'No.'
  165.     se 'c9Delete cb"caBMillionairescb"c6..file? c7[ceNoc7]c6: ce';gc;a=result
  166.     if a='Y' then do;se 'Yes!';if exists(tfile"BMillionaires") then address command "delete "tfile"BMillionaires"
  167.       tr ' cdDonec6.';end;else tr 'No.'
  168.     se 'c9Delete cb"caBankerscb"c6........file? c7[ceNoc7]c6: ce';gc;a=result
  169.     if a='Y' then do;se 'Yes!';if exists(tfile"Bankers") then address command "delete "tfile"Bankers"
  170.       tr ' cdDonec6.';end;else tr 'No.'
  171.     if ~exists(tfile"GameData") | ~exists(tfile"Players") then do
  172.       se 'n1c6For cfsafety c6reasons, we must now c9EXIT c6the file. Simply enter '
  173.       se 'one of the ceGame Modules c6to cabind c6any changes made here...';end
  174.   exit;end
  175.  
  176. GETCONFIG:
  177.   dfile=df;rfile=dfile"Registered/";tfile=dfile"Texts/"
  178.   call open(f1,dfile"!Settings","r")
  179.     v=readln(f1);parse var v j ver vdate;j=readln(f1)
  180.     call close(f1);reg=exists(rfile"Reg.Key");return
  181.  
  182. SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
  183.   e2="  Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
  184.   logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
  185.   do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
  186.   bufferflush
  187. /**************************************************************************\
  188. \****************************************** Frontiers BBS (716)/823-9892 **/
  189.